function PlayerPlane(x, y, src, size_w, size_h, speed, blood, bullet) {
  Plane.call(this, x, y, src, size_w, size_h, speed)
  this.blood = blood;
  this.bullet = bullet;
  this.bulletArray = [];
  this.timer = null;
  this.died = false;
  this.score = 0;
  this.kill = 0;
  this.bulletSpeed = 8;
  this.enemyCreateSpeed = 1;
  this.gameTime = 0;
  this.bulletAudio = arrow_shot;
  this.init();

  this.up = false;
  this.down = false;
  this.left = false;
  this.right = false;
  this.step = true;
  this.shotFlag = false;
  this.timer = setInterval(() => {
    if (this.died) {
      clearInterval(this.timer);
      return;
    }
    this.up && this.towardUp();
    this.down && this.towardDown();
    this.left && this.towardLeft();
    this.right && this.towardRight();
    if (this.shotFlag && this.step) {
      this.shot();
      this.bulletAudio.play();
      this.step = false;
      setTimeout(() => {
        this.step = true;
      }, 1000 / this.bulletSpeed)
    }
  }, 1000 / 60)
}

PlayerPlane.prototype = new Plane();
PlayerPlane.prototype.constructor = PlayerPlane;
PlayerPlane.prototype.towardUp = function () {
  this.y = this.y < 0 ? - this.speed : this.y - this.speed
  this.move();
}
PlayerPlane.prototype.towardDown = function () {
  this.y = this.y > MAX_HEIGHT - this.size_h ? MAX_HEIGHT - this.size_h + this.speed : this.y + this.speed
  this.move();
}
PlayerPlane.prototype.towardLeft = function () {
  this.x = this.x < - this.size_w / 2 ? - this.size_w / 2 - this.speed : this.x - this.speed
  this.move();
}
PlayerPlane.prototype.towardRight = function () {
  this.x = this.x > MAX_WIDTH - this.size_w / 2 ? MAX_WIDTH - this.size_w / 2 + this.speed : this.x + this.speed;
  this.move();
}

PlayerPlane.prototype.collide = function () {
  this.blood--;
  this.eleNode.style.opacity = '0';
  setTimeout(() => {
    this.eleNode.style.opacity = '1';
  }, 150);
}

PlayerPlane.prototype.shot = function () {
  let x = this.x + this.size_w / 2 - this.bullet.size_w / 2;
  let y = this.y;
  let bullet = new Bullet(x, y, ...getBulletInfo.call(this.bullet))
  bullet.plane = this;
  this.bulletArray.push(bullet);
}

PlayerPlane.prototype.check = function () {
  if (this.blood <= 0) {
    this.died = true;
  }
}